package com.zxy.ziems.server.device.pojo.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDate;
import java.util.List;

@Data
public class DeviceCustomDataDTO {
    /**
     * 分类ID
     */
    @NotBlank(message = "分类ID不可为空", groups = {Add.class})
    private String classifyId;

    /**
     * tag
     */
    @NotBlank(message = "标签名不可为空", groups = {Add.class})
    private String tag;

    /**
     * ID
     */
    @NotBlank(message = "手工录入ID，不可为空", groups = {AddVal.class})
    private String id;

    /**
     *
     */
    @NotEmpty(message = "手工录入ID，不可为空", groups = {Delete.class})
    private List<String> ids;

    /**
     * 设备自定义值
     */
    @NotEmpty(message = "手工录入值不可为空", groups = {AddVal.class})
    private List<DeviceCustomDataValDTO> deviceCustomDataValDTOList;

    /**
     * 开始日期
     */
    @NotNull(message = "开始时间不可为空", groups = {Delete.class})
    private LocalDate startDate;

    /**
     * 结束日期
     */
    @NotNull(message = "结束时间不可为空", groups = {Delete.class})
    private LocalDate endDate;

    public interface Add { }

    public interface AddVal { }

    public interface Delete { }
}
